<template>
  <div>
    <div class="top">
      <div class="arrow" @click="arrow">
        <img src="../../src/assets/arrow1.png" alt="" />
      </div>
      <div class="header">
        <p>添加设备</p>
      </div>
    </div>
    <div v-if="this.$route.params.type === 'sosT'">
      <div class="add-device">
        <div class="head">
          <img
            style="width: 100px; height: 100px"
            src="../assets/warning_add.png"
            alt=""
          />
        </div>
        <div class="body">
          <div class="body-item">
            <img
              style="width: 26px; height: 26px"
              src="../assets/warning_add.png"
              alt=""
            />
            <input style="border: none" placeholder="输入/扫描注册码" />
            <img src="../assets/scan.png" style="width: 24px; height: 24px" />
          </div>
          <div class="body-item">
            <img
              src="../assets/profile-active.png"
              style="width: 24px; height: 24px"
            />
            <input style="border: none" placeholder="安装位置" />
          </div>
        </div>
      </div>
      <van-button class="btn">添加</van-button>
    </div>
    <div v-if="this.$route.params.type === 'redT'">
      <div class="add-device">
        <div class="head">
          <img
            style="width: 100px; height: 100px"
            src="../assets/infrared_crile.png"
            alt=""
          />
        </div>
        <div class="body">
          <div class="body-item">
            <img
              style="width: 26px; height: 26px; margin-right: 3px"
              src="../assets/infrared_crile.png"
              alt=""
            />
            <input style="border: none" placeholder="输入/扫描注册码" />
            <img src="../assets/scan.png" style="width: 24px; height: 24px" />
          </div>
          <div class="body-item">
            <img
              src="../assets/profile-active.png"
              style="width: 24px; height: 24px; margin-right: 3px"
            />
            <input style="border: none" placeholder="安装位置" />
          </div>
        </div>
      </div>
      <van-button class="btn">添加</van-button>
    </div>
    <div v-if="this.$route.params.type === 'fireT'">
      <div class="add-device">
        <div class="head">
          <img
            style="width: 100px; height: 100px"
            src="../assets/infrared_crile.png"
            alt=""
          />
        </div>
        <div class="body">
          <div class="body-item">
            <img
              style="width: 26px; height: 26px; margin-right: 3px"
              src="../assets/infrared_crile.png"
              alt=""
            />
            <input style="border: none" placeholder="输入/扫描注册码" />
            <img src="../assets/scan.png" style="width: 24px; height: 24px" />
          </div>
          <div class="body-item">
            <img
              src="../assets/profile-active.png"
              style="width: 24px; height: 24px; margin-right: 3px"
            />
            <input style="border: none" placeholder="安装位置" />
          </div>
        </div>
      </div>
      <van-button class="btn">添加</van-button>
    </div>
  </div>
</template>

<script>
import router from "@/router";
export default {
  name: "AddDevice",
  methods: {
    arrow() {
      // console.log('asdasd')
      router.go(-1);
    },
  },
};
</script>

<style lang='scss' scoped>
@import "./AddDevice.scss";
</style>